<template>
	<!-- 平台统计 -->
	<view class="statistics">
		<view class="statistics-box1">
			<view class="box1-text">
				<view class="round red"></view>
				<view class="text">用户：</view>
				<view class="count">{{statisticsList.userCount}}人</view>
			</view>
			<view class="box1-text">
				<view class="round green"></view>
				<view class="text">回收员：</view>
				<view class="count">{{statisticsList.collectorCount}}人</view>
			</view>
			<view class="box1-text">
				<view class="round blue"></view>
				<view class="text">合伙人：</view>
				<view class="count">{{statisticsList.partnerCount}}人</view>
			</view>
			<view class="box1-text">
				<view class="round yellow"></view>
				<view class="text">回收站：</view>
				<view class="count">{{statisticsList.packCount}}个</view>
			</view>
		</view>
		<view class="statistics-box1">
			<view class="box1-text">
				<view class="round red"></view>
				<view class="text">回收站今日订单：</view>
				<view class="count">{{statisticsList.collectorOrderDay}}单</view>
			</view>
			<view class="box1-text">
				<view class="round green"></view>
				<view class="text">回收站累计总单：</view>
				<view class="count">{{statisticsList.collectorOrderTotal}}单</view>
			</view>
			<view class="box1-text">
				<view class="round blue"></view>
				<view class="text">今日回收订单：</view>
				<view class="count">{{statisticsList.packOrderDay}}单</view>
			</view>
			<view class="box1-text">
				<view class="round yellow"></view>
				<view class="text">累计回收总单：</view>
				<view class="count">{{statisticsList.packOrderTotal}}单</view>
			</view>
		</view>
		<view class="statistics-box1">
			<view class="box1-text">
				<view class="round red"></view>
				<view class="text">今日新增用户：</view>
				<view class="count">{{statisticsList.userCountDay}}人</view>
			</view>
			<view class="box1-text">
				<view class="round green"></view>
				<view class="text">本周新增用户：</view>
				<view class="count">{{statisticsList.userCountWeek}}人</view>
			</view>
		</view>
		<view class="statistics-box1">
			<view class="box1-text">
				<view class="round red"></view>
				<view class="text">合伙人今日支出：</view>
				<view class="count">{{statisticsList.partnerDay}}回收币</view>
			</view>
			<view class="box1-text">
				<view class="round green"></view>
				<view class="text">合伙人累计总支出：</view>
				<view class="count">{{statisticsList.partnerTotal}}回收币</view>
			</view>
		</view>
		<!-- 底部tabbar导航 -->
		<tabBar currentPage="statistics"></tabBar>
	</view>
</template>

<script>
	import tabBar from "@/component/count/tabbar.vue"
	import $http from "@/component/commen/api/request.js"
	export default {
		components:{
			tabBar
		},
		data() {
			return {
				statisticsList:"",//平台统计数据
			};
		},
		onShow() {
			this.getStainfo()
		},
		methods:{
			getStainfo(){
				$http({
					url:"?i=2&t=0&v=2.7.4&from=wxapp&c=entry&a=wxapp&do=admin&op=platformStats&&m=wjyk_recycle&sign=42387cf9578e4cc78e92a611bb7b99df",
					method:"get"
				}).then(res=>{
					console.log(res)
					this.statisticsList = res.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.statistics{
	padding: 0 20rpx;
	padding-bottom: 150rpx;
	.statistics-box1{
		padding: 20rpx 0 40rpx 0;
		margin-top: 20rpx;
		box-sizing: border-box;
		background: #fff;
		border-radius: 30rpx;
		.box1-text{
			padding-left: 120rpx;
			display: flex;
			align-items: center;
			margin-top: 30rpx;
			.round{
				margin-right: 20rpx;
				width: 17rpx;
				height: 17rpx;
				border-radius: 50%;
				// padding: 20rpx 0;
				box-sizing: border-box;
			}
			.red{
				background: #ff6a6a;
			}
			.green{
				background: #56db95;
			}
			.blue{
				background: #6ac3ff;
			}
			.yellow{
				background: #ffa66a;
			}
			.text{
				margin-right: 10rpx;
			}
			.count{
				font-weight: bold;
				font-size: 30rpx;
			}
		}
	}
}
</style>
